<body>
    <div id="app">
        <p>{{message}}</p>
    </div>
    <div id="app-2">
        <span v-bind:title="message2">
            鼠标悬停几秒钟查看此处动态绑定的提示信息！可以在浏览器console中输入:app2.message2="hasaki"来修改展示
        </span>
    </div>
    <div id="app-3">
        <p v-if="seen">现在你看到我了,可以在浏览器console中把app3.seen=false,那么字符串就会消失</p>
    </div>

    <div id="app-4">
        <ol>
          <li v-for="todo in todos">
            {{ todo.text }}
          </li>
        </ol>
        <p>在浏览器的console中输入app4.todos.push({text:"Hasaki"})来增加列表</p>
      </div>

      <div id="app-5">
        <p>{{message5}}</p>
        <button v-on:click="reverseMessage">更新消息</button>
      </div>
      

      <div id="app-6">
        <p>{{ message6 }}</p>
        <input v-model="message6">
      </div>
</body>




<!-- 开发环境版本，包含了有帮助的命令行警告 -->
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>

<script>
    var app = new Vue({
    el: '#app',
    data: {
        message: 'Icey Sweets'
    }
    })
</script>

<script>
    var app2 = new Vue({
  el: '#app-2',
  data: {
    message2: '页面加载于 ' + new Date().toLocaleString()
  }
})

</script>

<script>
    var app3 = new Vue({
  el: '#app-3',
  data: {
    seen: true
  }
})
</script>

<script>
    var app4 = new Vue({
  el: '#app-4',
  data: {
    todos: [
      { text: '学习 JavaScript' },
      { text: '学习 Vue' },
      { text: '整个牛项目' }
    ]
  }
})
</script>


<script>
var app5 = new Vue({
  el: '#app-5',
  data: {
    message5: 'Hello Vue.js!'
  },
  methods: {
    reverseMessage: function () {
      this.message5 = 'Hasaki make it work'
    }
  }
})
</script>

<script>
    var app6 = new Vue({
  el: '#app-6',
  data: {
    message6: 'Hello Vue!'
  }
})
</script>